package cevent.source.cloudcenter.server.dto;/**
 * Created by Cevent on 2021/3/15.
 */

import java.util.List;

/**
 * @author cevent
 * @description 分页插件DTO
 * @date 2021/3/15 11:51
 */
public class PageDto<T> {
    //1.当前页码
    protected int currentPage;
    //2.每页条数
    protected int size;
    //4.总条数(pageInfo处理的total属性为long)
    protected Long totalSize;
    //5.查询记录放入list
    protected List<T> listPageData;

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public Long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Long totalSize) {
        this.totalSize = totalSize;
    }

    public List<T> getListPageData() {
        return listPageData;
    }

    public void setListPageData(List<T> listPageData) {
        this.listPageData = listPageData;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("PageDto{");
        sb.append("currentPage=").append(currentPage);
        sb.append(", size=").append(size);
        sb.append(", totalSize=").append(totalSize);
        sb.append(", listPageData=").append(listPageData);
        sb.append('}');
        return sb.toString();
    }
}
